﻿@model braklimitu.Models.LoginModel
@Scripts.Render("~/Scripts/units.js")
@Styles.Render("~/Content/css/login.css")

    @if (Request.IsAuthenticated) {
    <div class="welcome_panel">
        Witaj, użytkowniku @Html.ActionLink(User.Identity.Name, "Manage", "Account", routeValues: null, htmlAttributes: new { @class = "username", title = "Zarządzaj" }).
        Twój tranfer: 
        
        <b>@Html.Action("getTransfer","Account")</b>
        
        <div class="logout_line">    
            <div class="logout_button">
                @using (Html.BeginForm("LogOff", "Account", FormMethod.Post, new { id = "logoutForm" })) {
                    @Html.AntiForgeryToken()
                    <a href="javascript:document.getElementById('logoutForm').submit()">WYLOGUJ</a>
                }
             </div>
        </div>
    </div>
}
else{
    <section id="loginForm">
    @using (Html.BeginForm(new { ReturnUrl = ViewBag.ReturnUrl })) {
    @Html.AntiForgeryToken()
    @Html.ValidationSummary(true)
    
    <div class="login_fieldset">
        <fieldset>
            <legend>Formularz logowania</legend>
                    <div class="login_textarea">
                        Logowanie:
                        @Html.TextBoxFor(m => m.UserName, new { @Value= "Login..." })       
                        @Html.PasswordFor(m => m.Password, new { @Value= "Password" })
                    </div>
                
                    <div class="buttons">
                        <input type="checkbox"  id="RememberMe" class="checkbox1" />
                        <label for="RememberMe">Pamiętaj mnie</label>
                        @Html.ActionLink("Przypomnij hasło","ForgotPassword","Account")
                    </div>
                    <div class="login_line">
                        <input class="login_button" type="submit" value="ZALOGUJ" name="Zaloguj"/>
                    </div>
        </fieldset>
    </div>
}
</section>

}
@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}
